//
//  HttpManager.h
//  hotlifeForBusiness
//
//  Created by zhuweideng on 16/3/29.
//  Copyright © 2016年 zhuweideng. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>
#import "AFNetworking.h"
#import "Config.h"
//#import "base64.h"
//#import "rsa.h"
@interface HttpManager : NSObject
{
    SecKeyRef publicKey;
    SecCertificateRef certificate;
    SecPolicyRef policy;
    SecTrustRef trust;
    size_t maxPlainLen;
}
+ (HttpManager *)getInstance;

- (void)post:(NSString *)url params:(NSDictionary *)parameters successCallback:(void (^)(NSString *state, id responseObject))successCallback;
- (void)get:(NSString *)url params:(NSDictionary *)parameters successCallback:(void (^)(NSString *state, id responseObject))successCallback;
- (void)post:(NSString *)url params:(NSDictionary *)parameters successCallback:(void (^)(NSString *state, id responseObject))successCallback failCallback:(void (^)(NSString *state, id responseObject))failCallback;
- (void)get:(NSString *)url params:(NSDictionary *)parameters successCallback:(void (^)(NSString *state, id responseObject))successCallback failCallback:(void (^)(NSString *state, id responseObject))failCallback;


- (void)getsStockData:(NSString *)url params:(NSDictionary *)parameters responseObjects:(void (^)( id responseObject))responseObjects failCallback:(void (^)(NSString *state, id responseObject))failCallback;

-(NSString*) rsaEncryptString:(NSString*)string ;

@end
